import { createStore } from 'vuex'
import taskbar from './modules/taskbar'
import desktop from './modules/desktop'

export default createStore({
  state: {
    theme: 'light'
  },
  mutations: {
    // 亮 暗 主题
    CHANGE_THEME(state,val){
      state.theme = val
    },
  },
  actions: {
    changeTheme({commit},val){
      commit('CHANGE_THEME',val)
    }
  },
  modules: {
    taskbar,
    desktop
  }
})
